package com.jinxinol.core.common.verifycode;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 
 * @company Jinxin Computer Corp.
 * @author Chenbing
 * @email wwwchenbing@gmail.com
 * @description 负责调用验证码生成器生成验证码
 * @date 2012-8-12
 */
public class VerifyCodeSevlet extends HttpServlet {

	private static final long serialVersionUID = -7802245601848060804L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		
		this.doPost(request, response);
	}

	/**
	 * 生成数字和字母的验证码
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		
		VerifyCodeGenerator vcGenerator = VerifyCodeGenerator.getInstance();
		vcGenerator.printImage(request, response);

	}
}
